package com.iCall.sip;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.net.UnknownHostException;

public class SipClient {

	public static void main(String[] args) throws UnknownHostException, IOException {
		Socket socket = new Socket("127.0.0.1", 9005);
		
		OutputStream out = socket.getOutputStream();
		out.write(new String("hello sip").getBytes("UTF-8"));
		
		InputStream in = socket.getInputStream();
		byte[] bytes = new byte[4028];
		int len = 0;
		while ((len = in.read(bytes)) > 0){
			System.out.println(new String(bytes, 0, len, "UTF-8"));
		}
	}
}
